def func1():
    yield 1
    func2()
    yield 2

def func2():
    yield 3
    yield 4

f1=func1()
for i in f1:
    print(i)